package com.leng.utils;

import org.apache.shiro.crypto.hash.SimpleHash;

/**
 * @Description: 加密
 * @Author: shiyu
 * @Date: 2022/8/22 10 37
 **/
public class MD5Utils {

    public static String md5Encryption(String source,String salt){
        String algorithmName = "MD5"; //加密算法
        int hashIterations = 1024; //加密次数
        SimpleHash simpleHash = new SimpleHash(algorithmName, source, salt, hashIterations);
        return simpleHash+"";
    }

}
